<!DOCTYPE html>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
<title>grid</title>
<%@include file="/resource/component_BI.jsp"%>
</head>
<body class="fullBody">
<!-- loading -->
<div id="loading">
	<div id="loading-center"><div id="loading-center-absolute">
		<div class="object" id="object_four"></div><div class="object" id="object_three"></div>
		<div class="object" id="object_two"></div><div class="object" id="object_one"></div>
	</div></div>
</div>
	<div id="pageTitle"></div>
    <div class="nui-fit" >
        <div id="datagrid" class="nui-datagrid" style="width:100%;height:100%;" allowAlternating="true"
            url="../data/data_grid.txt" sizeList="[10,20,30,50]" pageSize="20">
            <div property="columns">
                <div type="indexcolumn" width="30" headerAlign="center" align="center">序号</div>
                <div field="code" width="120" headerAlign="center">编号</div>    
                <div field="name" width="120" headerAlign="center">名称</div>                            
                <div field="userName" width="80" headerAlign="center" align="center">姓名</div>
                <div field="department" width="100">部门</div>       
                <div field="date" width="80" headerAlign="center" align="center" dateFormat="yyyy-MM-dd">日期</div>                                 
                <div field="remark" width="100" allowSort="true">备注</div>            
            </div>
        </div> 
    </div>
</body>
</html>
<script type="text/javascript">
nui.parse();

var datagrid = nui.get('datagrid');

$(function(){
	var name = getQueryString("name");
	if (name) {
		var pageTitle = decodeURI(decodeURI(name));
		$("#pageTitle").addClass("page-title").text(pageTitle);
	}
	
	var pageSize = parseInt(getQueryString("pageSize"));
	if (isNaN(pageSize)) pageSize = 20;
	
	datagrid.load({ pageSize: pageSize });
	
	// 关闭加载效果
	$("#loading").fadeOut();
})
</script>